import psutil
import time
def get_running_games():
    games = []
    for proc in psutil.process_iter():
        try:
            name = proc.name()
            if name == 'LeagueClient.exe':
              games.append('英雄联盟')
            elif '无畏契约' in name:
              games.append('无畏契约')
        except (psutil.NoSuchProcess, psutil.AccessDenied, psutil.ZombieProcess):
            pass
    return games
while True:
  running_games = get_running_games()
  for game in list(set(running_games)):
      print(game)
  time.sleep(10)